home *** CD-ROM | disk | FTP | other *** search
-
- LISTING 6
- #define SEND_TIMEOUT 5 * 1000 /* 5 seconds, in ms. */
-
- void timeout(int nd)
- {
- long tmo = SEND_TIMEOUT;
-
- /* Set the timeout option, so our reads won't wait forever. */
- if ((set_option(nd, DGRAM, NET_OPT_TIMEOUT,
- (char far *)tmo, 4)) != 0) {
- printf("Send: couldn't set timeout option.\n");
- exit(1);
- }
- }
-
-